package com.hzncc.flowable_diboot.vo.refundmanage;

import com.baomidou.mybatisplus.annotation.TableField;
import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.entity.SapCustomer;
import com.hzncc.flowable_diboot.entity.refundmanage.RefundContract;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.hzncc.flowable_diboot.entity.refundmanage.RefundRegister;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.List;
import java.time.LocalDate;

/**
* 合同退款 VO定义
* @author MyName
* @version 1.0
* @date 2024-11-11
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class RefundContractListVO extends RefundContract  {
private static final long serialVersionUID = 1347771415254781797L;

    /**
    * 租户 关联信息
    */
    @BindField(entity = IamTenant.class, field = "name", condition = "this.tenant_id = id")
    private String tenantIdLabel;

    /**
    * 退款类型 关联字典选项
    */
    @BindDict(type = "paymentType", field = "refundType")
    private LabelValue refundTypeLabel;

    /**
    * 成本中心 关联字典选项
    */
    @BindDict(type = "costCenter", field = "costCenter")
    private LabelValue costCenterLabel;

    /**
    * 销售区域 关联字典选项
    */
    @BindDict(type = "salesArea", field = "salesArea")
    private LabelValue salesAreaLabel;

    /**
     * 退款合同类别 关联字典选型
     */
    @BindDict(type = "refundContractCategory", field = "refundContractCategory")
    private LabelValue refundContractCategoryLabel;

    /**
     * 流程状态 关联字典选型
     */
    @BindDict(type = "refundContractStatus", field = "processState")
    private LabelValue processStateLabel;

    /**
     * Sap客户名称
     */
    @BindField(entity = SapCustomer.class,field = "name",condition = "this.sap_customer_id = id")
    private String sapCustomerName;

    /**
     * Sap客户编码
     */
    @BindField(entity = SapCustomer.class,field = "sapNo",condition = "this.sap_customer_id = id")
    private String sapCustomerCode;

    /**
     * 销售
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.saler = id")
    private String salerLabel;

    /**
    * 创建人 关联信息
    */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by = id")
    private String createByLabel;

    /**
    * 更新人 关联信息
    */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by = id")
    private String updateByLabel;

    /**
     * 退款金额
     */
    @BindField(entity = RefundRegister.class, field = "refundAmount", condition = "this.refund_register_id = id")
    private BigDecimal refundAmount;

    /**
     * 已退款金额
     */
    @BindField(entity = RefundRegister.class, field = "returnAmount", condition = "this.refund_register_id = id")
    private BigDecimal returnAmount;

    /**
     * 未退款金额
     */
    @BindField(entity = RefundRegister.class, field = "noReturnAmount", condition = "this.refund_register_id = id")
    private BigDecimal noReturnAmount;

}